1. Field of the Invention
Apparatuses and methods consistent with the present invention relate to encoding and decoding an image, and more particularly, to encoding and decoding a block that contains regions, such as an edge or a texture, that is difficult to precisely predict, thus reducing the compression efficiency of encoding, thereby ensuring high compression efficiency.
2. Description of the Related Art
In video compression methods, such as Motion Pictures Expert Group (MPEG)-1, MPEG-2, and H.264/MPEG-4 Advanced Video Coding (AVC), a picture is divided into a plurality of macro blocks in order to encode an image. Then, each of the macro blocks is prediction encoded by performing inter prediction or intra prediction thereon. Specifically, a predicted block of a current block that is to be encoded is produced using inter prediction or intra prediction, only a residual block obtained by subtracting the predicted block from the current block is encoded, and the encoded residual block is transmitted. That is, the values of pixels included in the current block are not directly encoded; instead, the result of subtracting the value of each pixel of the predicted block from the value of the corresponding pixel of the current block is encoded, thereby improving the compression efficiency of encoding, as will now be described in detail with reference to FIG. 1.
FIG. 1 is a block diagram of a related art image encoding apparatus 100. The encoding apparatus 100 includes a prediction unit 102, a frame memory 104, a transformation unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse transformation unit 114, and a filter 116.
The prediction unit 102 performs inter prediction or intra prediction so as to produce a predicted block of a current block that is to be encoded. In the case of inter prediction, a block similar to the current block is searched for from among one or more reference pictures stored in the frame memory 104. The searched block is used as a predicted block of the current block. In the case of intra prediction, intra directional prediction is performed using pixels of previously encoded blocks adjacent to a current block so as to produce a predicted block of the current block.
A residual block is obtained by subtracting the predicted block from the current block, and is orthogonally transformed into the frequency domain by the transformation unit 106. The transformation unit 106 orthogonally transforms the residual block into the frequency domain by producing discrete cosine transform (DCT) coefficients by performing DCT on a residual value of each pixel of the residual block.
The quantization unit 108 quantizes the DCT coefficients received from the transformation unit 106 by using a predetermined quantization coefficient Qp. The entropy encoding unit 110 entropy encodes the quantized DCT coefficients and inserts the encoded result into a bitstream.
Also, the quantized DCT coefficients are inversely quantized by the inverse quantization unit 112, and restored to the residual block by the inverse transformation unit 114. The restored residual block is added to the predicted block produced by the prediction unit 102.
The resultant block is deblocking filtered by the filter 116, and stored in the frame memory 104 so that it can be used to perform inter prediction or intra prediction on a subsequent block.
As described above with reference to FIG. 1, a predicted block of a current block must be as similar as possible to the current block in order to prediction encode the current block with high compression efficiency, using a related art image encoding apparatus. However, if the current block contains pixels of an edge region or a text region, it is difficult to precisely perform prediction on the current block.
Accordingly, there is a need for development of a method and apparatus for encoding and decoding even an image block, which is difficult to precisely predict, with high compression efficiency.